-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added multiple database support. #340
Open
baudhuina
wants to merge
18
commits into
django-parler:master
Choose a base branch
from
baudhuina:multiDB_support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improved documentation in cache.py
- Corrected typo in djangodummy/settings.py: I guess 'parser' was supposed to be 'parler'. - Added 2 pages to cover the use of multiple databases and keep track of the design decisions. - Added new entry in changelog (no version, no date).
…elease). - Adapted test_query_count.py in two places to accommodate the new signature of get_translation_cache_key() and new structure of the keys. - Ran and finalized tests: all 99 OK.
…mpatibility. Created docs/_static folder with dummy static file to silence Sphinx warning, which is treated as error when run by tox Completed tox.ini to cover django up to 4.2 and python up to 3.10
- Added Sphinx in docs/_ext/djangodummy/requirements.txt and upgraded django, and sphinxcontrib-django to current versions - Fixed all problems resulting in warnings during doc build with the current version of Sphinx (7.2.5) (tox upgrades them to errors). - Orphan page not tagged as :orphan: - :django:setting: role must just be :setting: - A couple of docstring formatting issues.
- upgraded python and coverage versions in tox.ini - excluded tests and example from coverage measurement. Now down to 81%...
Added workflow_dispatch to be able to run manually Temporarily added multiDB_support branch to have the workflow run once automatically;.
Changed platform to ubuntu-20.04 because python 3.6 is not available on ubuntu-22.04
…future__ import annotations' for pre-3.10 python, but this import is not available for 3.6.
… what has to be done.
In test.yaml, removed the trigger on branch multipleDB_support.
…ch was treated as error by tox. - Added some additional tests in test_multiple_db() to cover create_translation()/delete_translation() methods.
…n attempt to overwrite a model in another DB. This is very unlikely to be the intention, so information about the current and target db is essential for the use to correct his use of parler.
…ved_pk which caused erroneous detections of object duplication. - Refined tests for detecting duplication when saving - Refined tests accordingly. - Added a warning in documentation: forcing pk is possible for translatable models, just as for plain models, but is equally dangerous if the use does not manage transactions properly to avoid race conditions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is the result of my investigation discussion #325 . It revealed several issues when using multiple database and extensive tests have been added to detect them, and check they are properly fixed.
Changes:
Backward compatibility: complete.
Test:
Version and date
Version and date left open as 2.x in: